package com.zw.a.basic.a13.demo13_callable;

import java.util.concurrent.Callable;

//自定义的资源类, 也是Callable接口的子类.
//public class MyCallable implements Callable<String> {
public class MyCallable implements Callable {

    @Override
    //public String call() throws Exception {
    public Object call() throws Exception {
        System.out.println("实现Callable接口的方式, 实现多线程");
        return "我是返回值";
    }
}
